<%
layout("/layouts/platform.html"){
%>
<%DIRECTIVE DYNAMIC;%>
<form id="companyAddForm" role="form" class="form-horizontal parsley-form" data-parsley-validate action="${base}/platform/student/toSubjectThreeEditDo" method="post">
<header class="header navbar bg-white shadow">
    <div class="btn-group tool-button">
        <a class="btn btn-default navbar-btn" href="${base}/platform/student/toSubjectThree" data-pjax><i class="ti-angle-left" id="goback"></i> 返回</a>
    </div>
    <div class="pull-right">
    	<div class="btn-group tool-button">
    	 	<button class="btn btn-default navbar-btn" data-loading-text="正在提交...">提 交</button>
        </div>
   </div>
</header>

<div class="content-wrap">
	<div class="wrapper" style="min-height:500px;height: 100%;">
		<div class="box-tab">
			<ul class="nav nav-tabs">
				<li class="active">
          			<a href="#base_info" data-toggle="tab">基本信息</a>
				</li>
				<li>
                	<a href="#kemuer" data-toggle="tab">科目三</a>
                </li>
           	</ul>
			<div class="tab-content">
				<input type="hidden" name="id" value="${obj.student.id!}"/>
         		<div class="tab-pane fade active in" id="base_info">
         			<div class="row mb10">
         				<div class="form-group">
                            <label for="company_id" class="col-sm-2 control-label">档案归属</label>
	                 		<div class="col-sm-6">
                                <input type="text"  value="${obj.company.name!}" class="form-control" readonly="readonly"  placeholder="档案归属">
                            </div>
                        </div>
                        <div class="form-group">
                        	<label for="enroll_time" class="col-sm-2 control-label">报名时间</label>
                            <div class="col-sm-6">
	                         	<input type="text" value="${@date.getDateInteger(obj.student.enroll_time!)}" readonly="readonly" class="form-control" />
	                		</div>
                        </div>
                        <div class="form-group">
                			<label for="school_id" class="col-sm-2 control-label">分配驾校</label>
	                 		<div class="col-sm-6">
	                 			<input type="text"  value="${obj.school.name!}" class="form-control" readonly="readonly" >
                            </div>
                      	</div>  
                      	<div class="form-group">  
                            <label for="driving_type" class="col-sm-2 control-label">驾考类型</label>
	                 		<div class="col-sm-6">
	                 			<input type="text"  value="<% if(obj.student.driving_type =='C1'){%>C1"<%}else{%>C2<%}%>" class="form-control" readonly="readonly" >
                            </div>
                        </div>
                     	<div class="form-group">
                            <label for="name" class="col-sm-2 control-label">名称</label>
                            <div class="col-sm-2">
                                <input type="text" id="name" value="${obj.student.name!}" class="form-control"   placeholder="名称"  readonly="readonly"> 
                            </div>
                            
                            <label for="mobile" class="col-sm-2 control-label">电话</label>
                            <div class="col-sm-2">
                                <input type="text" id="mobile"  value="${obj.student.mobile!}" class="form-control"   placeholder="电话"   data-parsley-type="number" readonly="readonly">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="id_no" class="col-sm-2 control-label">身份证</label>
                            <div class="col-sm-2">
                                <input type="text" id="id_no" value="${obj.student.id_no!}" class="form-control"   placeholder="身份证"  readonly="readonly">
                            </div>
                            
                            <label for="sex" class="col-sm-2 control-label">性别</label>
                            <div class="col-sm-2" style="margin-top: 5px">
                            	 <input type="text"  value="<% if(obj.student.sex =='0'){%>男"<%}else{%>女<%}%>" class="form-control" readonly="readonly" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="birth" class="col-sm-2 control-label">出生日期</label>
	                   		<div class="col-sm-6">
	                      		<input type="text"  readonly class="form-control" value="${obj.student.birth!}" >
	                		</div>
                        </div>
               		</div>
         		</div>
         		
         		<div class="tab-pane fade" id="kemuer">
         			<div class="row mb10">
         				<div class="form-group">
                        	<label for="subject2_mode" class="col-sm-2 control-label">培训方式</label>
                            <div class="col-sm-8">
                                <input type="text" id="subject2_mode"  value="<% if(obj.student.subject3_mode ==-1){%>未指定<%}else if(obj.student.subject3_mode ==0){%>计时<%}else if(obj.student.subject3_mode ==1){%>包干<%}%> " class="form-control" readonly="readonly" >
                            </div>
                      	</div>
         				<div class="form-group">
                        	<label for="subject3_address" class="col-sm-2 control-label">初选场地</label>
                            <div class="col-sm-8">
                                <input type="text" id="subject3_address"  value="${obj.student.subject3_address!}" class="form-control" readonly="readonly"  placeholder="初选场地" >
                            </div>
                      	</div>
                      	<div class="form-group">
                        	<label for="subject3_field" class="col-sm-2 control-label">首选场地</label>
                            <div class="col-sm-8">
                                <select id="subject3_field" name="subject3_field" class="form-control" required="required">
                                	<option value="">--选择场地--</option>
                                	<%for(field in obj.fieldList){%>
                                		 <option value="${field.id}"  <% if(obj.student.subject3_field ==field.id){%>selected="selected"<%}%> >${field.name}</option>
                                	<%}%>
                                </select>
                            </div>
                        </div>
                      	<div class="form-group">
                        	<label for="subject3_trainer" class="col-sm-2 control-label">首选教练</label>
                            <div class="col-sm-8">
                                <select id="subject3_trainer" name="subject3_trainer" class="form-control" required="required">
                                	<option value="">--选择教练--</option>
                                	<%for(coach in obj.coachList){%>
                                		 <option value="${coach.id}"  <% if(obj.student.subject3_trainer ==coach.id){%>selected="selected"<%}%> >${coach.name}</option>
                                	<%}%>
                                </select>
                            </div>
                        </div>
         			</div>
         		</div>
         	</div>
   		</div>
    </div>
</div>
</form>
<script language="JavaScript">
    $(document).ready(function () {
        $('#companyAddForm').ajaxForm({
            dataType: 'json',
            beforeSubmit: function (arr, form, options) {
            },
            success: function (data, statusText, xhr, form) {
                if (data.code==0) {
                    Toast.success(data.msg);
                    setTimeout(function () {
                        $("#goback").trigger("click");
                    }, 1000);
                } else {
                    Toast.error(data.msg);
                }
            }
        });
    });
</script>
<%}%>